
package View;


import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;

/**
 *
 * @author CCD gruppe 2
 */
public class NewProjectFrame extends javax.swing.JFrame {

    ProjectInfoPanel projectInfoPanel;

    /** Creates new form CreateNewProjectFrame */
    public NewProjectFrame() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        projectInfoPanel = new ProjectInfoPanel();
        getContentPane().add(projectInfoPanel);
        pack();
        setCenterPos(this);

    }// </editor-fold>

    private static void setCenterPos(JFrame frame) {
        Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
        int x = (int) ((screen.getWidth() - frame.getWidth()) / 2);
        int y = (int) ((screen.getHeight() - frame.getHeight()) / 2);
        frame.setLocation(x, y);
    }

    /*
     * Getters and setters
     */

    public ProjectInfoPanel getProjectInfoPanel() {
        return projectInfoPanel;
    }

}
